#include<iostream>
#include<string>
using namespace std;
char Findoncestr(const string& str)
{
    int i = 0;
    int j = 0;
    char ch = 0;
    for (i = 0; i < str.size(); ++i)
    {
        for (j = 0; j < str.size(); ++j)
        {
            if (i != j)
            {
                if (str[i] == str[j])
                    break;
            }
        }
        if (j == str.size() - 1)
        {
            ch = str[j];
            for (j = 0; j < str.size() - 1; ++j)
            {
                if (str[j] == ch)
                    break;
            }
            if (j == str.size() - 2)
                return ch;
        }
    }
    return -1;
}
int main()
{
    string str;
    while (cin >> str)
    {
        char retstr = Findoncestr(str);
        cout << retstr << endl;
    }
    return 0;
}